package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.InventoryMapper;
import com.ruoyi.system.domain.Inventory;
import com.ruoyi.system.service.IInventoryService;
import com.ruoyi.common.core.text.Convert;

/**
 * Inventory 服务层实现
 * 
 * @author ruoyi
 * @date 2019-07-06
 */
@Service
public class InventoryServiceImpl implements IInventoryService 
{
	@Autowired
	private InventoryMapper inventoryMapper;

	/**
     * 查询Inventory信息
     * 
     * @param productId InventoryID
     * @return Inventory信息
     */
    @Override
	public Inventory selectInventoryById(Integer productId)
	{
	    return inventoryMapper.selectInventoryById(productId);
	}
	
	/**
     * 查询Inventory列表
     * 
     * @param inventory Inventory信息
     * @return Inventory集合
     */
	@Override
	public List<Inventory> selectInventoryList(Inventory inventory)
	{
	    return inventoryMapper.selectInventoryList(inventory);
	}
	
    /**
     * 新增Inventory
     * 
     * @param inventory Inventory信息
     * @return 结果
     */
	@Override
	public int insertInventory(Inventory inventory)
	{
	    return inventoryMapper.insertInventory(inventory);
	}
	
	/**
     * 修改Inventory
     * 
     * @param inventory Inventory信息
     * @return 结果
     */
	@Override
	public int updateInventory(Inventory inventory)
	{
	    return inventoryMapper.updateInventory(inventory);
	}

	/**
     * 删除Inventory对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteInventoryByIds(String ids)
	{
		return inventoryMapper.deleteInventoryByIds(Convert.toStrArray(ids));
	}
	
}
